package models;

import java.util.Date;
import java.util.Map;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Transient;

import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;

import play.data.validation.Min;
import play.db.jpa.Model;

@Entity
public class Evaluation2 extends Model {
	
	public double critere1NotePedagogique;
	public double critere2NotePedagogique;
	public double critere3NotePedagogique;
	public double critere1NoteSupport;
	public double critere2NoteSupport;
	public double critere3NoteSupport;
	
	public Date createdAt;

	@Lob
	public String commentaire = null;

	@ManyToOne
	public Intervention interventionEvaluation2;

	@ManyToOne
	public Student studentEvaluation2;

	private Evaluation2(double critere1NotePedagogique,
			double critere2NotePedagogique, double critere3NotePedagogique,
			double critere1NoteSupport, double critere2NoteSupport,
			double critere3NoteSupport, String commentaire,
			Intervention interventionEvaluation2, Student studentEvaluation2) {
		super();
		this.critere1NotePedagogique = critere1NotePedagogique;
		this.critere2NotePedagogique = critere2NotePedagogique;
		this.critere3NotePedagogique = critere3NotePedagogique;
		this.critere1NoteSupport = critere1NoteSupport;
		this.critere2NoteSupport = critere2NoteSupport;
		this.critere3NoteSupport = critere3NoteSupport;
		this.commentaire = commentaire;
		this.interventionEvaluation2 = interventionEvaluation2;
		this.studentEvaluation2 = studentEvaluation2;
	}
	
	public Evaluation2() {
		this(0,0,0,0,0,0,null,null,null);
	}

}
